package com.yupi.yupao.common;

/**
 * @Author zy
 * @Date 2024/10/22 21:32
 * @packageName:com.yupi.usercenter.common
 * @ClassName:ErrorCode
 *
 * 自定义错误及错误码
 */
public enum ErrorCode {
    SUCCESS(0,"ok",""),
    PARAMS_ERROR( 40000 , "请求数据错误",""),
    NULL_ERROR(  40001,"请求数据为空", ""),
    NOT_LOGIN(40100,"未登录",""),
    SYSTEM_ERROR(50000,"系统内部异常",""),
    FORBIDDEN(40301,"禁止操作",""),
    NO_AUIH( 40101,"无权限", "");

    private final int code;

    private final String message;

    private final String descriptions;


    ErrorCode(int code, String message, String descriptions) {
        this.code = code;
        this.message = message;
        this.descriptions = descriptions;
    }

    public int getCode() {
        return code;
    }

    public String getDescriptions() {
        return descriptions;
    }

    public String getMessage() {
        return message;
    }

}
